<extend name="Layout:layout_list" />
<block name="body_content_block">
    <table id="main_grid" class="easyui-datagrid" data-url="{:AddonU('Statics/get_queuecalltime_list_json')}"></table>
    <div id="tb" style="padding:2px 5px;">
        <div style="margin-bottom: 5px; border-bottom:solid 1px #dddddd;">
            <a href="#" class="easyui-linkbutton lnk_grid_search" iconCls="icon-search" plain="true">搜索</a>
        </div>
    </div>
    <!--隐藏区域-->
    <div style="display:none">
        <!--表格查询对话框-->
        <div id="dlg_search" style="padding:10px">
            <form method="get" action="{:AddonU('Statics/get_queuecalltime_list_json')}" data-export-url="{:AddonU('Statics/queuecalltime_export')}">
                日期：<input type="text" name="beginbilldate" class="easyui-datebox" value="{$search.beginbilldate}" />至<input type="text" name="endbilldate" class="easyui-datebox" value="{$search.endbilldate}" />
                时间：<input type="text" class="easyui-timespinner" name="beginTime" data-options="showSeconds:true" value="{$search.beginTime}" />至<input type="text" class="easyui-timespinner" data-options="showSeconds:true" name="endTime" value="{$search.endTime}" />
                队列：<input type="text" name="agentID" id="agentID" data-url="{:AddonU('Queue/get_queue_json')}" />
            </form>   
        </div>
        <!--/表格查询对话框-->
    </div>
    <!--/隐藏区域-->
</block>
<block name="body_after_block">
    <script type="text/javascript">
        // 页面初始化
        var curd_grid = CurdGrid.newInstance();
        curd_grid.before_search_dialog = function () {
            $('#agentID').combobox({url: $('#agentID').data('url'), valueField: 'id', textField: 'text'});
        }
        curd_grid.config({
            title: '分队列通话时长统计',
            toolbar: '#tb',
            fitColumns: true,
            showFooter: true,
            columns: [[
                    {title: "租户ID", field: "siteIDText", sortable: true},
                    {title: "日期", field: "billdate", sortable: true},
                    {title: "队列号", field: "agentID", sortable: true},
                    {title: "队列呼通总量", field: "connCount", sortable: true},
                    {title: "0-10秒", field: "sec0to10", sortable: true},
                    {title: "10-20秒", field: "sec10to20", sortable: true},
                    {title: "20-30秒", field: "sec20to30", sortable: true},
                    {title: "30-40秒", field: "sec30to40", sortable: true},
                    {title: "40-50秒", field: "sec40to50", sortable: true},
                    {title: "50-60秒", field: "sec50to60", sortable: true},
                    {title: "1-2分钟", field: "min1to2", sortable: true},
                    {title: "2-3分钟", field: "min2to3", sortable: true},
                    {title: "3-5分钟", field: "min3to5", sortable: true},
                    {title: "5-8分钟", field: "min5to8", sortable: true},
                    {title: "8-15分钟", field: "min8to15", sortable: true},
                    {title: "15-30分钟", field: "min15to30", sortable: true},
                    {title: "30分钟以上", field: "min30gt", sortable: true},
                    {title: "编号", field: "id", hidden: true},
                ]],
        });
        curd_grid.init();
    </script>
</block>